package com.example.hello_world.RecyclerView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import com.example.hello_world.R;

public class RecyclerTest extends AppCompatActivity {

    private RecyclerView recyclerView;
    private recyAdapter adapter;
    private decoration decoration;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_recycler_test);

        recyclerView=findViewById(R.id.recycler);

        adapter=new recyAdapter(this);
        recyclerView.setAdapter(adapter);

        LinearLayoutManager manager=new LinearLayoutManager(this,RecyclerView.VERTICAL,false);
        recyclerView.setLayoutManager(manager);

        decoration=new decoration(15);
        recyclerView.addItemDecoration(decoration);
    }
}